#!/bin/bash
echo "[+] Cleanup cache"
apt-get clean
apt-get update
rm -fr /public.gpg
echo "[+] Trying to remove stuff like ktorrent,kopete and other communication tools.."
apt-get -y --force-yes remove --purge ark-kde3 kcron-kde3 bogofilter-bdb bogofilter bogofilter-common keep-kde3 kate-kde3 kpilot-kde3 kmail-kde3 konversation-kde3 kopete-kde3 kppp-kde3 ktorrent-kde3 krfb-kde3 bluez-utils bluez-cups kdebluetooth bluez-audio libbluetooth3 krdc-kde3 k3b-kde3 akregator-kde3 kdepim-wizards-kde3 kdepim-kio-plugins-kde3 kdepim-kresources-kde3 kaddressbook-kde3 kontact-kde3 kmailcvt-kde3 kmail-kde3 korganizer-kde3 kooka-kde3 digikam-kde3 wvdial pppconfig pppoeconf ppp fdutils gimp telnet ubiquity ubiquity-frontend-kde ubiquity-casper ubiquity-ubuntu-artwork cdparanoia cdrdao dvd+rw-tools wodim fortunes-min fortune-mod amarok-kde3 desktop-effects-kde-kde3 kamera-kde3 kscreensaver-kde3 gwenview-kde3 hplip rdesktop ksnapshot-kde3 karm-kde3 kwalletmanager-kde3 avahi-autoipd avahi-daemon
echo "Autoremove packages..."
apt-get -y --force-yes autoremove || failure "apt-get autoremove $@ failed, error=$?"

echo "[+] Unmounting dev,proc,sys mountpoints.."
# cupsd bruker /dev/null og må dø for umount
killall cupsd

# For sikkerhets skyld..
umount $DIGEKS_TARGET/proc > /dev/null
umount $DIGEKS_TARGET/dev > /dev/null
umount $DIGEKS_TARGET/sys > /dev/null

# EOF
